package com.yupi.springbootinit.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 聊天消息表
 * @TableName chatMessages
 */
@TableName(value ="chatMessages")
@Data
public class ChatMessages implements Serializable {
    /**
     * 消息id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 房间id
     */
    private String roomId;

    /**
     * 发送者类型
     */
    private Object sender;

    /**
     * 消息内容
     */
    private String content;

    /**
     * 创建时间
     */
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}